﻿@using FL.SiteEntity;
@using FL.Common;
@using FL.Bussiness.Site;
@{
    var isLogin = (Session["User"] == null);
    int pagesize = Model.pagesize;
    string code = Model.code;
    string type = Model.type;
    IList<v_t_site_article> list = BArticle.CreateInstance().GetImagesArticleList(code, "", pagesize, 1);
}

@if (list != null)
{
    switch (type)
    {
        case "pic_news"://图文混排
            break;
        case "3pic_news":
                    <div style="border-bottom:1px solid #ccc;margin-bottom:15px;padding-left:10px;"><h4>@Model.title</h4></div>
                    <div class="col-lg-12" style="margin:0px;padding:10px;">
                        <div class="row">
                            <div class="col-lg-7" style="margin-left:0px;padding:0px;">
                                <div style="width:100%;padding-right:0px;"><a href="/article/articleView?id=@list[0].id"><img src="@list[0].img_url" alt="" style="width:100%;height:210px;"></a></div>
                                <div style="z-index:1;position:absolute;margin-top:-20px;background:#000;color:#fff;width:92%;text-align:center;padding-right:0px;filter:alpha(Opacity=60);-moz-opacity:0.5;opacity: 0.5; "><a href="" style="color:#fff"><span>@list[0].title</span></a></div>
                            </div>
                            <div class="col-lg-5" style="margin:0px;">
                                <div class="" style="width:100%"><a href="/article/articleView?id=@list[1].id"><img src="@list[1].img_url" alt="" style="width:100%;height:100px;margin-bottom:10px;"></a></div>
                                <div class="" style="z-index:1;position:absolute;margin-top:-30px;background:#000;color:#fff;width:90%;text-align:center;filter:alpha(Opacity=60);-moz-opacity:0.5;opacity: 0.5;"><a href="" style="color:#fff"><span>@list[1].title.lenString(15)</span></a></div>
                                <div class="" style="width:100%"><a href="/article/articleView?id=@list[2].id"><img src="@list[2].img_url " alt=" " style=" width:100%;height:100px"></a></div>
                                <div class="" style="z-index:1;position:absolute;margin-top:-20px;background:#000;color:#fff;width:90%;text-align:center;filter:alpha(Opacity=60);-moz-opacity:0.5;opacity: 0.5;"><a href="" style="color:#fff"><span>@list[2].title.lenString(15)</span></a></div>
                            </div>
                        </div>
                    </div>
            break;
        case "4pic_news":
            <div class="col-md-12">
            <h4>@Model.title</h4>
            </div>
            foreach (v_t_site_article article in list)
            {
                <div class="col-md-6">
                    <p class="textFlo"><a href="/article/articleView?id=@article.id"><img src="@article.img_url" alt="@article.title" style="width:100%;height:100px;"></a></p>
                    <p class="textFlo"><a href="/article/articleView?id=@article.id">@article.title</a></p>
                </div>
            }
            break;
        default://默认图片展示模式
             <div class="row" style="margin-top:5px;">
                <div style="border-bottom:1px solid #ccc;margin-bottom:15px;padding-left:10px;"><h4>@Model.title</h4></div>
                @foreach (v_t_site_article article in list)
                {
                        <div class="col-lg-6">
                            <div class="row">
                                <div class="col-lg-5"><img src="@article.img_url" style="width:100%" /></div>
                                <div class="col-lg-7">
                                    <p class=""><h5><a href="/Article/ArticleView?id=@article.id">@article.title</a></h5></p>
                                    <p class="contentCent"><a href="">@article.zhaiyao.Substring(0, 26) ......</a></p>
                                    <p class="contenticon">
                                        <span class="fl"><img src="/images/img/calendar.png" alt=""></span><span class="Spanmar">@article.add_time.ToShortDateString()&nbsp;&nbsp;&nbsp;&nbsp;</span>
                                        <span class="fl"><img src="/images/img/message.png" alt=""></span><span class="Spanmar">@article.read_count&nbsp;&nbsp;&nbsp;&nbsp;</span>
                                        <span class="fl"><img src="/images/img/eyes.png" alt=""></span><span class="Spanmar">@article.read_count</span>
                                    </p>
                                </div>
                            </div>
                        </div>
                }
            </div>
        break;

                }

                }
